{template header}
<script src="data/js/media.js" type="text/javascript"></script>

<script>
jQuery(document).ready(function(){
/* 图片不完全按比例自动缩小 by zwwooooo */
    $(window).load(function(){
	$('#content div.thumbnail img').each(function(){
		var x = 400; //填入目标图片宽度
		var y = 400; //填入目标图片高度
		var w=$(this).width(), h=$(this).height();//获取图片宽度、高度
		if (w &gt; x) { //图片宽度大于目标宽度时
			var w_original=w, h_original=h;
			h = h * (x / w); //根据目标宽度按比例算出高度
			w = x; //宽度等于预定宽度
			if (h &lt; y) { //如果按比例缩小后的高度小于预定高度时
				w = w_original * (y / h_original); //按目标高度重新计算宽度
				h = y; //高度等于预定高度
			}
		}
		$(this).attr({width:w,height:h});
	});
    });
});
</script>

<style>
.thumbnail{overflow:hidden;max-width:400px;max-height:400px;}
</style>

<link type="text/css" rel="stylesheet" href="{$TS_APP[tpl][skin]}{$skin}/editor.css" />

<div class="midder">

<h1><!--{if $strTopic[typeid] !='0'}--><a href="index.php?app=group&ac=group&groupid={$strTopic[groupid]}&typeid={$strTopic[typeid]}">[{$strTopic[type][typename]}]</a>{/if}{$strTopic[title]}</h1>

<div class="qi_c_c">

<div class="qi_c_cleft">

<div class="topic-content clearfix">
<div class="user-face">
<a href="index.php?app=user&ac=space&userid={$strTopic[user][userid]}"><img title="{$strTopic[user][username]}" alt="{$strTopic[user][username]}" src="{$strTopic[user][face]}" class="pil"></a>
<br />
{php doAction('topic_face_footer',$strTopic)}
</div>
<div class="topic-doc">
<h3>
<span class="color-green">{php echo date('Y-m-d H:i:s',$strTopic[addtime])}</span>
<span class="pl20">来自: <a href="index.php?app=user&ac=space&userid={$strTopic[userid]}">{$strTopic[username]}（{$strTopic[user][city][cityname]}）</a></span>
</h3>
<p>{$strTopic[content]}</p>

<!--签名-->
<!--{if $strTopic[user][signed] != ''}-->
<div class="signed">{$strTopic[user][signed]}</div>
<!--{/if}-->

<!--{if $TS_USER[user][userid] == $strTopic[userid] || $TS_USER[user][userid]==$strGroup[userid] ||$strGroupUser[isadmin]=="1" || $TS_USER[user][isadmin]=="1"}-->
<div style="text-align:right;">
<!--{if $TS_USER[user][userid]==$strGroup[userid] ||$strGroupUser[isadmin]=="1" || $TS_USER[user][isadmin]=="1"}-->
&gt;&nbsp; <a href="javascript:void('0');" onclick="topic_istop('{$strTopic[topicid]}','<!--{if $strTopic[istop]=='0'}-->1<!--{else}-->0<!--{/if}-->');"><!--{if $strTopic[istop]=='0'}-->置顶<!--{else}-->取消置顶<!--{/if}--></a> 
&gt;&nbsp; <a href="javascript:void('0');" onclick="topic_isshow('{$strTopic[topicid]}','<!--{if $strTopic[isshow]=='0'}-->1<!--{else}-->0<!--{/if}-->');"><!--{if $strTopic[isshow]=='0'}-->隐藏<!--{else}-->显示<!--{/if}--></a>
{/if}
&gt;&nbsp; <a href="index.php?app=group&ac=topic_edit&topicid={$strTopic[topicid]}">修改{$strShape[shapename]}</a> &gt;&nbsp; <a href="javascript:void('0');" onclick="topic_del('{$strTopic[groupid]}','{$strTopic[topicid]}');">删除</a>
</div>
<!--{/if}-->

<div>
<br />
<a class="share" href="javascript:void('0');" onclick="topic_collect('{$strTopic[topicid]}');">收藏</a></div>
</div>
</div>

{php doAction('topic_footer',$strTopic)}

<!--tag标签-->
<div class="tags">
<!--{loop $strTopic[tags] $key $item}-->
<a rel="tag" title="" class="post-tag" href="{$TS_URL[topic_tag]}{$item[tagid]}{$TS_URL[suffix]}">{$item[tagname]}</a>
<!--{/loop}-->
<!--{if $isGroupUser}-->
<a rel="tag" title="添加标签" alt="添加标签" class="post-tag thickbox" href="index.php?app=tag&ac=add_ajax&objname=topic&idname=topicid&objid={$topicid}&width=300&height=100&TB_iframe=true">+</a>
<!--{/if}-->

</div>

<div>
<h2>谁收藏了这篇帖子&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·</h2>
<script>topic_collect_user('{$strTopic[topicid]}');</script>
<div id="collects">
<div style="padding:10px;text-align:center;"><img src="{$TS_APP[tpl][skin]}{$skin}/loading.gif" />&nbsp;正在加载中...</div>
</div>
</div>

<ul class="topic-reply">

<!--{if is_array($arrTopicComment)}-->
<!--{loop $arrTopicComment $key $item}-->
<li class="clearfix">
<div class="user-face">
<a href="index.php?app=user&ac=space&userid={$item[user][userid]}"><img title="{$item[user][username]}" alt="{$item[user][username]}" src="{$item[user][face]}" class="pil"></a>
</div>
<div class="reply-doc">
<div class="bg-img-green">
<h4>{php echo date('Y-m-d H:i:s',$item[addtime])}
	<a href="index.php?app=user&ac=space&userid={$item[user][userid]}">{$item[user][username]}</a> ({$item[user][city][cityname]})
</h4>
</div>

<!--{if $item[referid] !='0'}-->
<div class="recomment"><a href="index.php?app=user&ac=space&userid={$item[recomment][user][userid]}"><img src="{$item[recomment][user][face]}" width="24" align="absmiddle"></a> <strong><a href="index.php?app=user&ac=space&userid={$item[recomment][user][userid]}">{$item[recomment][user][username]}</a></strong>：{$item[recomment][content]}</div>
<!--{/if}-->

<p>
{$item[content]}
</p>

<!--签名-->
<!--{if $item[user][signed] != ''}-->
<div class="signed">{$item[user][signed]}</div>
<!--{/if}-->


<div class="group_banned">
<!--{if $isGroupUser != '0'}-->
<span><a href="index.php?app=group&ac=recomment&commentid={$item[commentid]}&topicid={$item[topicid]}&width=400&height=120&TB_iframe=true" title="回复{$item[user][username]}的评论" onclick="tb_remove();" class="thickbox">回复</a></span>
<!--{/if}-->

<!--{if $TS_USER[user][userid] == $strGroup[userid] || $strGroupUser[isadmin]=="1" || $TS_USER[user][isadmin]=="1"}-->
<span><a class="j a_confirm_link" href="javascript:void('0');" onclick="comment_del('{$item[topicid]}','{$item[commentid]}');" rel="nofollow">删除</a>
</span>
<!--{/if}-->
</div>


</div>
</li>
<!--{/loop}-->
<!--{/if}-->
</ul>

<div class="manu">{$pageUrl}</div>

<h2>你的回应&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·&nbsp;·</h2>

<!--{if $isGroupUser == '0'}-->

<div style="font-size:14px;padding:40px 0;text-align:center;">不是本组成员不能回应此贴哦^_^</div>

<!--{elseif $strTopic[iscomment]=='1' && $strTopic[userid] != $TS_USER[user][userid]}-->
<div style="font-size:14px;padding:40px 0;text-align:center;">本帖除作者外不允许任何人评论^_^</div>
<!--{else}-->
<div class="txd">
<tr><td></td><td>

<!--ThinkSAAS迷你编辑器-->
{php include TmooTemplate("editor/editor_mini");}

</td></tr>
<form method="POST" action="index.php?app=group&ac=do&ts=addcomment" onSubmit="return submitonce(this)">
<textarea id="editor_content" cols="54" rows="8" name="content"></textarea><br>
<input type="hidden" name="topicid" value="{$strTopic[topicid]}" />
<input type="submit" value="加上去">
</form>
</div>
<!--{/if}-->

</div>

<div class="qi_c_cright">
<p class="pl2">&gt; <a href="{$TS_URL[group]}{$strTopic[groupid]}{$TS_URL[suffix]}">回{$strTopic[groupname]}小组</a></p>
<br />
<h2 class="usf">最新话题:</h2>
<div class="indent">

<!--{loop $newTopic $key $item}-->
<p class="pl ul"><a title="{$item[title]}" href="{$TS_URL[topic]}{$item[topicid]}{$TS_URL[suffix]}">{$item[title]}</a> &nbsp;
<span class="pl">({$item[username]}) </span></p>
<!--{/loop}-->
</div>

{php doAction('group_topic_right',$strTopic)}

</div>


</div>
</div>
{template footer}